import React from 'react';
import RadioGroup from "antd/es/radio/group";
import {RadioGroupProps} from "antd/es/radio/interface";
import ClassNames from "classnames";

export interface HYRadioGroupProps extends RadioGroupProps {
  type?: "default" | "separate";
}

class HYRadioGroup extends React.Component<HYRadioGroupProps, any> {
  constructor(props) {
    super(props);
  }

  render() {
    const {type, ...rest} = this.props;
    let className = type === "separate" ? ClassNames("hy-radio-group-separate") : ClassNames("hy-radio-group");
    return <RadioGroup className={className} {...rest} />;
  }
}

export default HYRadioGroup;
